Skip to content

Add support for compile with debug optimizations #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 21, 2020
Merged

Conversation

rsora
Copy link
Contributor

@rsora rsora commented Feb 21, 2020

This PR follows #590 And adds support for compile with debug optimization via CLI flag or gRPC message field.

If a core exposes a compiler.optimization_flags and a compiler.optimization_flags.debug properties for the compile recipe, using:
--optimize-for-debug in a compile command
or
CompileReq.optimizeForDebug = True in gRPC mode

the CLI sketch builder replaces standard compiler optimization flags with debug optimized ones, generating a "debugger friendly" sketch.

legacy testing was fixed accordingly

NOTE:
This modification caused to modify slightly the core caching folder generation process:
The CLI caches the compiled core for a sketch to improve compile performances.
To cache correctly a core built with (or without) debug optimization option, the compiled core saving process on disk must save the artifact in a different folder respect to the not debug optimized version.
The cached core reused process has also to fetch the core accordingly, during following compile iterations.

@rsora rsora force-pushed the rsora/debug-compile branch from 33971be to 4683706 Compare February 21, 2020 16:22
@rsora rsora marked this pull request as ready for review February 21, 2020 16:34
@rsora rsora added this to the 0.9.0 milestone Feb 21, 2020
@rsora rsora merged commit 88468f2 into master Feb 21, 2020
@rsora rsora deleted the rsora/debug-compile branch February 21, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants